# Maintainer: Antonio Rojas <arojas@archlinux.org>
# Contributor: Lukas Spies <lukas (at) photoqt _dot_ org>

pkgname=python-symengine
_pkgname=symengine.py
pkgver=0.11.0
pkgrel=1
arch=(loong64 x86_64)
pkgdesc='Python wrappers for SymEngine'
url='https://github.com/symengine/symengine.py'
depends=(gcc-libs
         glibc
         gmp
         gperftools
         libmpc
         mpfr
         python
         symengine)
makedepends=(cereal
             cmake
             cython
             llvm)
license=(MIT)
source=(https://github.com/symengine/symengine.py/archive/v$pkgver/$_pkgname-$pkgver.tar.gz)
sha256sums=('702fc5e5640e81714eacecf9da03ba1d9cc2f49fc8c4c6154b57d3d7dfacc698')

build() {
  cmake -B build -S $_pkgname-$pkgver \
    -DCMAKE_INSTALL_PREFIX=/usr
  cmake --build build
}

package() {
  DESTDIR="$pkgdir" cmake --install build
  install -Dm644 $_pkgname-$pkgver/LICENSE -t "$pkgdir"/usr/share/licenses/$pkgname
}
